using System.Collections.Generic;
using LitJson;
using System;

namespace Config
{
    [Serializable]
    public class ExampleConfig1Item : Config.AConfigItem, Config.IJsonFile
    {
        public string FileName => "example.ExampleConfig1";
        public string FilePath => "Configs/example.ExampleConfig1.json";
        public string FilePathNonSuffix => "Configs/example.ExampleConfig1";

        public long int_arg;
        public int[] int_arg2;
        public int[][] int_arg3;
        public float float_arg;
        public float[] float_arg2;
        public float[][] floatArg3;
        public bool bool_arg;
        public bool[] bool_arg2;
        public string str_arg;
        public string[] str_arg2;
        public long time;
        public long time2;
        public long time3;

        public override void Init(JsonData data)
        {
            id = int.Parse(data["i_id"].ToString());
            int_arg = long.Parse(data["i_int_arg"].ToString());
            var int_arg2__DATA = data["il_int_arg2"];
            var int_arg2__COUNT = int_arg2__DATA.Count;
            int_arg2 = new int[int_arg2__COUNT];
            for (var i = 0; i < int_arg2__COUNT; i++)
            {
                int_arg2[i] = int.Parse(int_arg2__DATA[i].ToString());
            }
            var int_arg3__DATA = data["ill_int_arg3"];
            var int_arg3__COUNT = int_arg3__DATA.Count;
            int_arg3 = new int[int_arg3__COUNT][];
            for (var i = 0; i < int_arg3__COUNT; i++)
            {
                var NESTING_DATA = int_arg3__DATA[i];
                var NESTING_DATA_COUNT = NESTING_DATA.Count;
                var NESTING_ARR = new int[NESTING_DATA_COUNT];
                for (var j = 0; j < NESTING_DATA_COUNT; j++)
                {
                    NESTING_ARR[j] = int.Parse(NESTING_DATA[j].ToString());
                }
                int_arg3[i] = NESTING_ARR;
            }
            float_arg = float.Parse(data["f_float_arg"].ToString());
            var float_arg2__DATA = data["fl_float_arg2"];
            var float_arg2__COUNT = float_arg2__DATA.Count;
            float_arg2 = new float[float_arg2__COUNT];
            for (var i = 0; i < float_arg2__COUNT; i++)
            {
                float_arg2[i] = float.Parse(float_arg2__DATA[i].ToString());
            }
            var floatArg3__DATA = data["fll_floatArg3"];
            var floatArg3__COUNT = floatArg3__DATA.Count;
            floatArg3 = new float[floatArg3__COUNT][];
            for (var i = 0; i < floatArg3__COUNT; i++)
            {
                var NESTING_DATA = floatArg3__DATA[i];
                var NESTING_DATA_COUNT = NESTING_DATA.Count;
                var NESTING_ARR = new float[NESTING_DATA_COUNT];
                for (var j = 0; j < NESTING_DATA_COUNT; j++)
                {
                    NESTING_ARR[j] = float.Parse(NESTING_DATA[j].ToString());
                }
                floatArg3[i] = NESTING_ARR;
            }
            bool_arg = data["b_bool_arg"].ToString()[0] == '1';
            var bool_arg2__DATA = data["bl_bool_arg2"];
            var bool_arg2__COUNT = bool_arg2__DATA.Count;
            bool_arg2 = new bool[bool_arg2__COUNT];
            for (var i = 0; i < bool_arg2__COUNT; i++)
            {
                bool_arg2[i] = bool_arg2__DATA[i].ToString()[0] == '1';
            }
            str_arg = data["s_str_arg"].ToString();
            var str_arg2__DATA = data["sl_str_arg2"];
            var str_arg2__COUNT = str_arg2__DATA.Count;
            str_arg2 = new string[str_arg2__COUNT];
            for (var i = 0; i < str_arg2__COUNT; i++)
            {
                str_arg2[i] = str_arg2__DATA[i].ToString();
            }
            time = long.Parse(data["t_time"].ToString());
            time2 = long.Parse(data["t_time2"].ToString());
            time3 = long.Parse(data["t_time3"].ToString());
        }
    }
}